package TestDemo;

import java.util.ArrayList;
import java.util.Scanner;

public class TestDemo2 {
    public static void main(String[] args) throws InterruptedException {
        Scanner sc = new Scanner(System.in);
        ArrayList<ArrayList<Integer>> arrayLists = new ArrayList<>();

        int price = sc.nextInt();
        
        for (int i = 0; i <= price / 100; i++) {
            for (int j = 0; j <= price / 50; j++) {
                for (int k = 0; k <= price / 20; k++) {
                    for (int l = 0; l <= price / 10; l++) {
                        for (int m = 0; m <= price / 5; m++) {
                            int all = i * 100 + j * 50 + k * 20 + l * 10 + m * 5;
                            if (all > price) break;
                            ArrayList<Integer> array = new ArrayList<>();
                            array.add(i);
                            array.add(j);
                            array.add(k);
                            array.add(l);
                            array.add(m);
                            array.add(price - all);
                            arrayLists.add(array);
                            System.out.println("100元"+i+"张,50元"+j+"张,20元"+k+"张,10元"+l+"张,5元"+m+"张,1元"+(price-all)+"张");
                            //Thread.sleep(500);
                        }
                    }
                }
            }
        }

        int min = price + 1;
        int minIndex = -1;
        for (int i = 0; i < arrayLists.size(); i++) {
            ArrayList array = arrayLists.get(i);
            int x = 0;
            for (int j = 0; j < array.size(); j++) {
                x += (int)array.get(j);
            }
            if (x < min) {
                min = x;
                minIndex = i;
            }
        }

        int i = arrayLists.get(minIndex).get(0);
        int j = arrayLists.get(minIndex).get(1);
        int k = arrayLists.get(minIndex).get(2);
        int l = arrayLists.get(minIndex).get(3);
        int m = arrayLists.get(minIndex).get(4);
        int n = arrayLists.get(minIndex).get(5);
        System.out.println("最小方案:100元"+i+"张,50元"+j+"张,20元"+k+"张,10元"+l+"张,5元"+m+"张,1元"+n+"张");

    }
}
